package cloud.juxue;

/**
 * @Description TODO
 * @Date 16:56 2021/10/20
 * @Version 1.0
 * @AUTHOR by yhsh
 */
public class Test {

    public static void main(String[] args) {
             String otcnum  =  getOct("\\346\\266\\210\\346\\201\\257\\350\\277\\231\\346\\230\\257\\346\\230\\257");
             System.out.println(otcnum);




    }

    public static String getOct(String s) {
        try {
            String[] as = s.split("\\\\");
            byte[] arr = new byte[as.length - 1];
            for (int i = 1; i < as.length; i++) {
                int sum = 0;
                int base = 64;
                for (char c : as[i].toCharArray()) {
                    sum += base * ((int)c - '0');
                    base /= 8;
                }
                if (sum >= 128) sum = sum - 256;
                arr[i - 1] = (byte)sum;
            }
            return new String(arr,"UTF-8");
        }catch (Exception  e){
            e.printStackTrace();
        }
    return null;
    }
}
